

#ifndef GISERPDAO_STRUCT_H
#define GISERPDAO_STRUCT_H

#include <stdint.h>
#include <string>
#include <iostream>
#include "libc2c/byte_stream.h"
#include "app_platform/intf_service_object.h"
#include "erp/gis/ddo/shiptypearealocusdo_gis.h"	
#include <vector>	
#include "erp/gis/ddo/shiptypearealocusdolist_gis.h"	

namespace erp
{
namespace gis
{
namespace dao
{

	const uint32_t GISERPDAO_GETMAPCOVERLOCUSLIST_REQ_CMD_ID = 0xc0241001; ///获取覆盖轨迹列表请求类  请求命令号
	const uint32_t GISERPDAO_GETMAPCOVERLOCUSLIST_RESP_CMD_ID = 0xc0248001; ///获取覆盖轨迹列表返回类  回应命令号
	

	const uint32_t GISERPDAO_SHIPTYPEAREALOCUSROWSYNC_REQ_CMD_ID = 0xc0241002; ///同步配送区域轨迹记录请求类  请求命令号
	const uint32_t GISERPDAO_SHIPTYPEAREALOCUSROWSYNC_RESP_CMD_ID = 0xc0248002; ///同步配送区域轨迹记录返回类  回应命令号
	


const uint16_t GISERPDAO_MAX_PROTOCAL_VERSION = 2; //>平台支持的最大协议版本号


///////////////////////////// STRUCTS /////////////////////////////////////////////////
	/**
	 *
 	 * 获取覆盖轨迹列表请求类 
	 *
 	 * @date 2013-10-20 15:24:25
 	 * @version 0
	 */	
	struct CGisErpDaoGetMapCoverLocusListReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint32_t shipType;
		uint32_t destGbId;
		std::string inReserve;
		erp::gis::ddo::CShipTypeAreaLocusDoList shipTypeAreaLocusDoList;	
		std::string errMsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return GISERPDAO_GETMAPCOVERLOCUSLIST_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > GISERPDAO_MAX_PROTOCAL_VERSION)
		    //    return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & shipType;
			bs & destGbId;
			bs & inReserve;
		    return bs.isGood();
		}
		
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 获取覆盖轨迹列表返回类 
	 *
 	 * @date 2013-10-20 15:24:25
 	 * @version 0
	 */	
	struct CGisErpDaoGetMapCoverLocusListResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		erp::gis::ddo::CShipTypeAreaLocusDoList shipTypeAreaLocusDoList;	
		std::string errMsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return GISERPDAO_GETMAPCOVERLOCUSLIST_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			shipTypeAreaLocusDoList.Serialize(bs);
			bs & errMsg;
			bs & outReserve;

		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};	
	/**
	 *
 	 * 同步配送区域轨迹记录请求类 
	 *
 	 * @date 2013-10-20 15:24:25
 	 * @version 0
	 */	
	struct CGisErpDaoShipTypeAreaLocusRowSyncReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		erp::gis::ddo::CShipTypeAreaLocusDo shipTypeAreaLocusDo;	
		std::string inReserve;
		std::string errMsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return GISERPDAO_SHIPTYPEAREALOCUSROWSYNC_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > GISERPDAO_MAX_PROTOCAL_VERSION)
		    //    return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			shipTypeAreaLocusDo.Serialize(bs);
			bs & inReserve;
		    return bs.isGood();
		}
		
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 同步配送区域轨迹记录返回类 
	 *
 	 * @date 2013-10-20 15:24:25
 	 * @version 0
	 */	
	struct CGisErpDaoShipTypeAreaLocusRowSyncResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errMsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return GISERPDAO_SHIPTYPEAREALOCUSROWSYNC_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errMsg;
			bs & outReserve;

		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};	

}
}
}

#endif /* GISERPDAO_STRUCT_H */

